Blog

How to clean and repair drive with DiskPart on Windows 11

  • To use DiskPart to repair a drive on Windows 11, open “Command Prompt” (admin), run the “DiskPart” tool, select and clean the drive, create an active primary partition, format the storage, and assign a drive letter.

On Windows 11, you can use the Check Disk (chkdsk) tool to scan and repair logical errors on a drive, but if the Task Manager continues to show one hundred percent active time on a drive, you’re still unable to access it, or you notice other problems, it could be a data corruption problem which you can resolve with DiskPart.

DiskPart is a command-line tool for managing drives on your computer. Usually, you would use the tool to set up a storage device, but if you’re having problems, you can use it to clean and repair the drive. Of course, this assumes you are dealing with a logical problem, not a hardware issue.

In this guide, I will teach you the steps to use DiskPart to revive a secondary hard drive on Windows 11.

Important: The instructions outlined below will delete any data on the drive. It’s assumed you have previously created a backup of the data you may need again.

Clean and repair drive with DiskPart on Windows 11

To erase and repair a hard drive on Windows 11 with DiskPart, use these steps:

  1. Open Start on Windows 11.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to open Diskpart and press Enter:

    diskpart
  4. Type the following command to determine the drive to format and press Enter:

    list disk
  5. Type the following command to select the storage and press Enter:

    select disk 3

    In the command, replace “3” with the flash drive number you want to use.

  6. Type the following commands to delete everything from the hard drive and press Enter:

    clean

  7. Type the following command to create a primary partition and press Enter:

    create partition primary
  8. Type the following command to select the new partition and press Enter:

    select partition 1
  9. Type the following command to make the selected partition active and press Enter:

    active

    DiskPart create active partition

  10. Type the following command to format and make the hard drive bootable and press Enter:

    format FS=NTFS quick

    DiskPart format drive

  11. Type the following command to assign a drive letter and make the drive accessible and press Enter:

    assign letter=X

    In the command, change “X” for any available letter you want to use.

  12. Type the following command to quit the tool and press Enter:

    exit

Once you complete the steps, the drive will be erased, formatted, and mounted with the specified drive letter, fixing the errors you may have experienced in the past.

These instructions are suited for repairing secondary drives, such as a second drive you may have installed to store data, or external drives and even flash drives. If the drive with the problem is the drive where the operating system is installed, then you can use the Check Disk tool or the DISM and SFC tools. In the case that the installation continues with issues, Windows 11 includes a feature to reinstall the operating system, keeping your files, settings, and apps.

Update August 12, 2024: This guide has been updated to ensure accuracy and reflect changes to the process.

Why You Can Trust Pureinfotech

The author combines expert insights with user-centric guidance, rigorously researching and testing to ensure you receive trustworthy, easy-to-follow tech guides. Review the publishing process.


Source link

Related Articles

Back to top button
close